package apps.softtech.fastmarket.listenner;

import android.content.Context;
import android.graphics.Color;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.widget.TabHost;

public class ListenerViewPager implements OnPageChangeListener{
	TabHost mTabHost;
	ViewPager mViewPager;
	Context mContext;
	public ListenerViewPager(TabHost mtaHost,ViewPager mPager,Context mContext){
		this.mTabHost = mtaHost;
		this.mViewPager = mPager;
		this.mContext = mContext;
		this.mViewPager.setOnPageChangeListener(this);
	}
	@Override
	public void onPageScrollStateChanged(int arg0) {
		
	}

	@Override
	public void onPageScrolled(int arg0, float arg1, int arg2) {
		
	}

	@Override
	public void onPageSelected(int position) {
		 mTabHost.setCurrentTab(position);
		
	}

}
